package org.pp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.pp.entity.User;

public interface UserMapper extends BaseMapper<User> {
    //List<User> getAll();

    void add(User user);

    Integer deleteByUserId(Integer id);

    //int[]
    Integer updateByUserId(User user);

    User get(@Param("id") Integer id,String name);

    int countAll();

    //当前时多少页，每一页是多少条
    IPage<User>  getPage(IPage<?> page, @Param("name") String name);
}